Skip to content

Document the DAYamlChecker --fix mode - #631

Merged
nonprofittechy merged 1 commit into
mainfrom
document-fix-mode
Sep 16, 2026
Merged

nonprofittechy merged 1 commit into
mainfrom
document-fix-mode

Conversation

@nonprofittechy

Copy link
Copy Markdown
Member

dayamlchecker --fix landed in DAYamlChecker#85. This documents it.

What is covered

A new Fixing findings automatically section on the DAYamlChecker page, placed after the six "what it checks" sections so the codes are already familiar, plus a short pointer from Running checks locally and a --fix row in the command line reference.

The section covers the four rules --fix writes (EG414, EG104, EA510, EA502), a worked before/after example, and then two things that matter more than the mechanics:

  • What each fix actually writes. How generated ids are normalized, why only the first unlabeled field on a screen gets a label, and why a question carrying Mako line directives moves to the label:/field: long form instead of being folded into a one-line label.
  • What the fixer declines to do. Every edit is validated before it is written, and a candidate that would introduce a new finding of any rule is thrown away rather than trading one finding for another. The example used is a real rejection: labeling a field would have left two fields sharing a label on one screen (WA515).

Two things authors are most likely to be surprised by are called out directly:

  • expanding a yes/no shorthand changes what the applicant sees — a two-button screen becomes a radio group with a Continue button;
  • --suppress ALL disables fixing along with reporting.

Verification

The worked example was extracted back out of the finished page and re-run through the fixer. Its before, its after, and the console output are reproduced verbatim. npm run build is clean and neither page appears in the site's broken-anchor warnings.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LNbgp4BzZY9JmUHjWjnWT1

`--fix` rewrites the four findings that have only one sensible answer --
a missing question id, a duplicate block id, a yes/no shorthand, and the
first unlabeled field on a multi-field screen -- and then checks the
result.

The new section covers what each fix writes, including how generated ids
are normalized and why a question carrying Mako line directives moves to
the `label:`/`field:` long form. It also covers what the fixer declines
to do: every edit is validated before it is written, and a file whose
candidate would introduce a new finding of any rule is left alone rather
than trading one finding for another.

Two things authors are most likely to be surprised by are called out
directly: expanding a yes/no shorthand changes what the applicant sees,
and `--suppress ALL` disables fixing along with reporting.

The worked example was run through the fixer and its before/after and
console output are reproduced verbatim.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LNbgp4BzZY9JmUHjWjnWT1
@nonprofittechy
nonprofittechy merged commit 96a7bef into main Sep 16, 2026
2 checks passed
@nonprofittechy
nonprofittechy deleted the document-fix-mode branch September 16, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant